@prefix-cls: ~'inbiz-search-engine';
@prefix-cls-drawer: ~'inbiz-search-engine-drawer';

.search-engine {
  .largePanel_btn {
    display: flex;
    align-items: center;
    padding-right: 24px;
    padding-left: 24px;
    color: #666;
    background-color: #f8f8f8;
    border: none;
    border-radius: 16px;

    .anticon {
      display: flex;
      align-items: center;
      margin-right: 5px;
      font-size: 16px;
      line-height: 1;
    }

    &:hover {
      color: var(--ant-primary-color);
      background-color: var(--ant-primary-1);
    }
  }

  .largePanel_iconBox {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;

    svg {
      margin-top: 8px;
    }

    &:hover {
      &>span {
        color: var(--inbiz-color-primary) !important;
      }

      background-color: rgba(var(--inbiz-color-primary-toRGB), 0.1);
    }
  }

  .ant-input-search>.ant-input-group>.ant-input-group-addon:last-child .ant-input-search-button {
    border-radius: 0 var(--inbiz-border-radius-base) var(--inbiz-border-radius-base) 0;
  }
}

.@{prefix-cls} {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  // padding-top: 52px;
  font-size: 14px;

  .close-drawer-icon {
    position: absolute;
    top: 0;
    right: 0;
    color: #999;
    font-size: 21px;
  }

  // 文档搜索类型
  .document-search-type {
    display: flex;
    flex-direction: column;
    margin-right: 40px;

    .item {
      width: 84px;
      margin-bottom: 10px;
      padding: 7px 0;
      color: var(--inbiz-color-text);
      font-weight: normal;
      font-size: 14px;
      font-stretch: normal;
      line-height: 20px;
      text-align: center;
      border-radius: 2px;
      cursor: pointer;

      &.active {
        color: var(--inbiz-color-primary);
        background-color: rgba(var(--inbiz-color-primary-toRGB), 0.1);
      }
    }
  }

  // 搜索主体
  .search-body-container {
    position: relative;
    flex: 1;
    max-width: 770px;
    // min-height: 80px;
    margin-right: 120px;

    .search-hot-keyword-top {
      display: flex;
      align-content: center;
      justify-content: center;
      width: 100%;

      &>div {
        display: inline-block;
        flex: 1;
        // width: 770px;
        max-width: 770px;
        // margin-right: 120px;

        // &.marginLeft {
        //   margin-left: 128px;
        // }
      }
    }

    .search-body-input-box {
      display: flex;
      align-items: center;
      position: relative;

      // 搜索框
      .search-input-container {
        position: relative;
        flex: 1;

        .ant-input-group-addon {
          left: 0;
          z-index: 2;
          background-color: transparent;
          border-right: none;
          padding: 0;
          border-radius: var(--inbiz-border-radius-base) 0 0 var(--inbiz-border-radius-base);

          .ant-select {
            margin: -5px 0;
            background-color: #fff;
            border-radius: var(--inbiz-border-radius-base) 0 0 var(--inbiz-border-radius-base);
          }

          .search-label-select {
            z-index: 100;
            color: var(--inbiz-color-heading);
            font-size: var(--inbiz-font-size-base);

            &:hover {
              .ant-select-arrow {
                color: var(--ant-primary-color);
              }
            }

            .ant-select-selection-item {
              color: #666;
              text-align: left;
            }
          }

          // .closeTag {
          //   .anticon {
          //     visibility: hidden;
          //   }

          //   &:hover {
          //     .anticon {
          //       visibility: visible;
          //     }
          //   }
          // }
        }

        .search-input-control {
          .ant-input {
            width: calc(100% + 10px);
            height: 50px;
            padding: 12px 11px;
            font-size: var(--inbiz-font-size-base);

            &:hover {
              border-color: #d9d9d9;
              box-shadow: none;
            }

            &:focus {
              border-color: #d9d9d9;
              box-shadow: none;
            }
          }
          .ant-select {
            .ant-select-selector {
              height: 48px;
              .ant-select-selection-item {
                line-height: 48px;
              }
            }
          }

          .ant-input-affix-wrapper-lg {
            align-items: center;
            padding: 0;
            border-color: #d9d9d9;
            box-shadow: none;

            &:hover {
              border-color: #d9d9d9;
              box-shadow: none;
            }

            &:focus {
              border-color: #d9d9d9;
              box-shadow: none;
            }

            .ant-input {
              height: 48px;
            }
          }

          .ant-input-suffix {
            padding: 10px;

            .anticon {
              color: #666;
              font-size: 16px;
              cursor: pointer;

              &:hover {
                color: var(--inbiz-color-primary);
              }
            }

            .anticon:not(:nth-child(1)) {
              margin-left: 5px;
            }

            .all-clear-action {
              color: #666;
              cursor: pointer;

              &:hover {
                color: var(--inbiz-color-primary);
              }
            }
          }

          .ant-select {
            .ant-select-selector {
              height: 48px;

              .ant-select-selection-item {
                line-height: 48px;
              }
            }
          }
        }

        .search-input-control_noindexrange {
          .ant-input-affix-wrapper-lg {
            border-radius: var(--inbiz-border-radius-base) 0 0 var(--inbiz-border-radius-base);
          }
        }
        .search-input-control-noneselect {
          .ant-input-group .ant-input-affix-wrapper:not(:last-child) {
            border-radius: var(--inbiz-border-radius-base)  0 0 var(--inbiz-border-radius-base);
          }
        }

        .ant-input-search-button {
          display: flex;
          align-items: center;
          justify-content: center;
          min-width: 80px;
          // width: 70px;
          height: 50px;
          color: #fff;
          font-size: 16px;
          transition: none;
          border-radius: 0 var(--inbiz-border-radius-base) var(--inbiz-border-radius-base) 0;
          .search-btn-icon {
            display: flex;
            align-items: center;
            margin-right: 12px;
            color: #fff;
            font-size: 20px;
          }

          .search-input-button-text {
            max-width: 150px;
            margin-left: 0;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
          }
        }
      }

      .result-search-box {
        margin-left: 20px;

        .ant-btn {
          display: flex;
          align-items: center;
          justify-content: center;
          min-width: 80px;
          height: 50px;
          padding: 0 15px;
          font-size: 16px;

          .anticon {
            display: flex;
            align-items: center;
            margin-right: 12px;
            color: #fff;
            font-size: 20px;
          }
        }
      }

      // 以图搜图
      .image-upload-box {
        position: absolute;
        // top: 50px;
        z-index: 100;
      }

      // 搜索方式
      .search-mode-container {
        position: absolute;
        top: 0;
        right: -20px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        max-width: 115px;
        height: 50px;
        white-space: nowrap;
        transform: translateX(100%);

        .ant-radio-wrapper {
          margin-right: 0;
          color: var(--inbiz-color-text);
          letter-spacing: 0;
        }

        .ant-radio-wrapper-checked {
          color: var(--inbiz-color-primary);
        }
      }
    }
    .detectionContainer {
      display: flex;
      justify-content: space-between;
      .ant-btn {
        padding: 4px 0;
      }
    }

    // 文档搜索类型
    .document-search-type-checkbox {
      .document-search-type-row {
        display: flex;
        align-items: center;
        height: 50px;

        &:nth-child(2) {
          border-top: 1px solid #ddd;
        }
      }
    }

    // 搜索条件
    .search-texts-box {
      display: flex;
      width: 100%;

      >span {
        line-height: 30px;
      }

      .search-txt-list {
        display: flex;
        flex: 1;
        flex-wrap: wrap;

        .search-txt-item {
          position: relative;
          display: flex;
          align-items: center;
          max-width: 440px;
          height: 30px;
          margin-right: 40px;

          .item-name {
            flex: 1;
            margin-right: 7px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
          }

          .colse-icon {
            position: absolute;
            top: -5px;
            right: -3px;
            color: #f75757;
            cursor: pointer;
          }

          >.anticon {
            position: absolute;
            right: -15px;
            color: #1989fa;
            color: var(--inbiz-color-primary);
            cursor: pointer;
          }
        }
      }
    }

    // 搜索方式
    .search-mode-container {
      position: absolute;
      top: 0;
      right: -20px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      max-width: 115px;
      height: 50px;
      white-space: nowrap;
      transform: translateX(100%);

      .ant-radio-wrapper {
        margin-right: 0;
        color: var(--inbiz-color-text);
        letter-spacing: 0;
      }

      .ant-radio-wrapper-checked {
        color: var(--inbiz-color-primary);
      }
    }
  }

  .searchMask {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 2;
    // background-color: #1989fa;
  }

  .show-more-icon {
    color: #707070;
    font-size: 20px;
    pointer-events: none !important;
  }

  .ant-select-open {
    .show-more-icon {
      color: var(--ant-primary-color);
    }
  }


  // 热门搜索
  .hot-keyword-container {
    display: flex;
    align-items: flex-start;

    &.bottom {
      margin-bottom: 20px;
      padding-top: 20px;
    }

    &.inside {
      padding: 16px;

      .list {
        display: inline-block;
        margin-left: 0;

        .titleitem {
          display: inline-block;
          margin-right: 30px;
          margin-left: 0;
          white-space: nowrap;

          &.title {
            margin-right: 10px;
            margin-bottom: 5px;
            color: #333;
          }
        }
      }
    }

    .title {
      // margin-bottom: 20px;
      color: #333;
      font-weight: normal;
      font-size: 14px;
      font-stretch: normal;
      // line-height: 19px;
    }

    .list {
      display: flex;
      flex: 1;
      flex-wrap: wrap;
      // margin-top: 3px;
      margin-left: -10px;
      width: 724px;

      .item {
        display: inline-block;
        max-width: 108px;
        margin-left: 30px;
        overflow: hidden;
        color: #666;
        font-weight: normal;
        font-stretch: normal;
        // line-height: 16px;
        white-space: nowrap;
        text-overflow: ellipsis;
        cursor: pointer;

        &:hover {
          color: var(--inbiz-color-primary);
        }
      }
    }
  }

  // 搜索结果面板(这个不能动)
  .search-result-panel {
    position: absolute;
    // top: 50px;
    right: 0;
    z-index: 100;
    overflow-y: auto;
    background-color: #fff;
    // border: solid 1px #dbdbdb;
    border-top: none;

    // box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.1);
    &>ul,
    &>div {
      border-right: solid 1px #dbdbdb;
      border-left: solid 1px #dbdbdb;
      margin-bottom: 0;
    }

    &>*:last-child {
      border-bottom: solid 1px #dbdbdb;
      // border-radius: 0 0 var(--inbiz-border-radius-base) var(--inbiz-border-radius-base);
    }

    &.not-dms {
      left: 0;
    }
  }

  // 搜索结果
  .search-result-list {
    li {
      padding: 6px 16px;
      color: #aaa;
      font-weight: normal;
      font-size: 14px;
      font-stretch: normal;
      cursor: pointer;

      b {
        color: #f25b43;
      }

      &:hover,
      &.hover {
        background-color: #f5f5f5;
      }

      .anticon {
        margin-left: 9px;
        color: #5dacfb;
      }
    }
  }

  // 高级搜索
  .advanced-search-open {
    display: flex;
    justify-content: flex-end;
    width: 100%;

    button {
      padding-right: 0;
    }
  }
}

.@{prefix-cls-drawer} {

  // 高级搜索样式2
  .drawer-ad-search-close {
    color: #999;
    font-size: 23px;
  }

  .ant-drawer-header {
    padding-bottom: 0;
    text-align: right;
    border: 0;
  }

  .ant-drawer-body {
    padding-bottom: 30px;
  }

  .advanced-detail {
    max-width: 1200px;
    margin: 0 auto;
  }

  .advance-form-tabs {
    .render-form-wrapper {
      width: 840px;

      .ant-form-item-label label {
        color: var(--inbiz-color-heading);
      }

      .ant-form-item:nth-child(2) {
        margin-top: 0;
      }
    }

    .render-form-wraper-style2 {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;

      >.ant-form-item {
        width: 46%;
      }
    }

    .ant-tabs-nav {
      margin-right: 66px;
    }

    .ant-tabs-nav-list {
      .ant-tabs-tab {
        width: 84px;
        padding: 5px 0;

        &>div {
          margin: 0 auto;
        }

        &.ant-tabs-tab-active {
          background-color: rgba(var(--inbiz-color-primary-toRGB), 0.1);
        }
      }

      .ant-tabs-ink-bar {
        display: none;
      }
    }

    .ant-tabs-content-holder {
      margin-left: 0;
      border: 0;

      .ant-tabs-tabpane {
        padding-left: 0;
      }
    }

    .more-conditions {
      padding-bottom: 30px;
      text-align: right;
    }
  }
}

// 菜单中的样式
.InbizMenuContainer {
  .SearchEngineContainer {
    min-width: 36px;

    .inbiz-BizBody {
      padding: 0 !important;
    }
  }
}